Socket
Socket
Sign inDemoInstall

@paprika/confirmation

Package Overview
Dependencies
Maintainers
5
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paprika/confirmation

Confirmation component allows user to confirm or cancel action


Version published
Maintainers
5
Created
Source

@paprika/confirmation - 0.3.44

Description

Confirmation component allows user to confirm or cancel action

Installation

yarn add @paprika/confirmation

or with npm:

npm install @paprika/confirmation

Props

Confirmation

PropTyperequireddefaultDescription
bodynodefalsenullContent of the popover confirmation
buttonSize[ Confirmation.types.size.SMALL, Confirmation.types.size.MEDIUM, Confirmation.types.size.LARGE]falseConfirmation.types.size.MEDIUMSize of the button
childrennodefalsenull
confirmButtonType[ Confirmation.types.kind.PRIMARY, Confirmation.types.kind.DESTRUCTIVE]falseConfirmation.types.kind.DESTRUCTIVEDetermine the styling of the confirm button
confirmLabelstringtrue-Label for the confirm button
defaultIsOpenboolfalsefalseIf the popover is open by default
headingstringfalsenullHeading for the popover confirmation
isPendingboolfalsefalseIf the confirm button should render in a pending state (with a spinner icon)
onClosefuncfalse() => {}Callback when cancel button is clicked
onConfirmfunctrue-Callback when confirm button is clicked

Usage

import Confirmation from "@paprika/confirmation";

<Confirmation
  confirmLabel="Delete filter"
  body="Lorem ipsum dolor amet vexillologist tacos selvage narwhal butcher twee ethical hot chicken"
  onConfirm={handleCloseConfirm => handleConfirm(handleCloseConfirm)}
  onClose={handleClose}
  heading="Delete filter?">
    <Confirmation.TriggerButton>Trigger</Confirmation.TriggerButton>
  </Confirmation>
;

or

<Confirmation
  confirmLabel="Delete filter"
  body="Lorem ipsum dolor amet vexillologist tacos selvage narwhal butcher twee ethical hot chicken"
  defaultIsOpen
  onConfirm={handleCloseConfirm => handleConfirm(handleCloseConfirm)}
  heading="Delete filter?"
/>;

Components

You can use the following components to compose the Confirmation:

<Confirmation.TriggerButton>

  • Storybook showcase
  • Github source code
  • Github create issue
  • ChangeLog

FAQs

Package last updated on 09 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc